      Program Euler1D
	  Use global
      Implicit None
      Call ReadInput
	  !write(*,*) nnt           ! nnt  number of nodes (i.e. discretization points)
      !write(*,*) L              ! length of the chamber
      !write(*,*) pres_L      ! initial pressure at the Left of the chamber
      !write(*,*) pres_R      ! initial pressure at the Right of the chamber
      !write(*,*) rho_L        ! initial Density at the Left of the chamber
      !write(*,*) rho_R       ! initial Denstyi at the Right of the chamber
      !write(*,*) v_L          ! initial velocity at the Left of the chamber
      !write(*,*) v_R          ! initial veocity at the Right of the chamber
      !write(*,*) gam         ! The specific heat ratio of the gas
      !write(*,*) R             ! The individual gas constant
      !write(*,*) CFL          ! nnt  number of nodes (i.e. discretization points)
      !write(*,*) cd            ! Dissipation 
	  
      Call Initialization
      Call Mass
	  
	  !!! Loop
      Total_time=0.D0
	  Delta_t=0.D0
	  istep=0
	  Call PrintP
	  
      Do While ((Total_time+Delta_t)< Tmax )
	    istep=istep+1
        Call DTime
	    Call Flux(U,F,nnt)
	    Call Residual
	    Call Solution
	    Call PrintP
	    Total_time=Total_time+Delta_t
		!write(*,*)Total_time,Delta_t
		
		if (istep==300) then
		  write(*,*) 'The maximum loop number.'
		  exit
		endif
		
		!write(*,*)
      Enddo

      End Program
